﻿#ifndef WORLDCHAT_H
#define WORLDCHAT_H 

#include"Player.h"
#include "EpollHead.hpp"
#include "SocketHead.hpp"
#include<list>
#include<queue>
#include<map>
#include <pthread.h>

typedef std::queue<std::string> Q_MSG;//消息队列
typedef std::map<int,Player> M_Player;//sock和玩家信息的map

M_Player m_players;
Q_MSG q_messages;
const char split_char='`';

void AddPlayer(int sockFd,sockaddr_in clntAddr);
void DelPlayer(int sockFd);
bool isCommand(std::string msg);
void DealCommand(int sock_fd,std::string command);//处理指令

void AddMsg(std::string);//增加消息



#endif